$(function (){
	$("#menu").BootstrapMenu({
		//location: 'top',
		items: [
		    {
		    	text: '主页', type: 'single', url: basePath+'/MainContrller/main'
	        },    
		    {
		    	text: '表格', type: 'dropdown', 
		    	subitems: [
	                {text: '简单表格', url: basePath+'/MainContrller/simpleTable'},
	                {text: '远程加载表格', url: basePath+'/MainContrller/remoteTable'},
	                {text: '响应式表格', url: basePath+'/MainContrller/responsiveTable'},
	                {text: '表格方法', url: basePath+'/MainContrller/tableMethods'},
	                {text: '表格校验', url: basePath+'/MainContrller/validateTable'},
		        ]
	        },
		    {
	        	text: '树', type: 'dropdown', 
		    	subitems: [
	                {text: '简单树', url: basePath+'/MainContrller/simpleTree'},
	                {text: '远程加载树', url: basePath+'/MainContrller/remoteTree'},
	                {text: '拖拽功能', url: basePath+'/MainContrller/dragTree'},
		        ]
	        },
		    {
	        	text: '手风琴', type: 'dropdown', 
		    	subitems: [
	                {text: '简单手风琴', url: basePath+'/MainContrller/simpleAccordion'},
		        ]
	        },
		    {
	        	text: '下拉框', type: 'dropdown', 
		    	subitems: [
	                {text: '简单下拉框', url: basePath+'/MainContrller/simpleCombobox'},
	                {text: '远程加载下拉框', url: basePath+'/MainContrller/remoteCombobox'},
		        ]
	        },
		    {
	        	text: '多选框', type: 'dropdown', 
		    	subitems: [
	                {text: '简单多选框', url: basePath+'/MainContrller/simpleCheckbox'},
		        ]
	        },
		    {
	        	text: '单选框', type: 'dropdown', 
		    	subitems: [
	                {text: '单选框', url: basePath+'/MainContrller/simpleRadio'},
		        ]
	        },	        
		    {
	        	text: '表单', type: 'dropdown', 
		    	subitems: [
	                {text: '简单表单', url: basePath+'/MainContrller/simpleForm'},
	                {text: '表单校验', url: basePath+'/MainContrller/validateForm'},	                
		        ]
	        },
		    {
	        	text: '标签页', type: 'dropdown', 
		    	subitems: [
	                {text: '标签页', url: basePath+'/MainContrller/simpleTabs'},	                
		        ]
	        },
		    {
	        	text: '弹出框', type: 'dropdown', 
		    	subitems: [
	                {text: '简单弹出框', url: basePath+'/MainContrller/simpleDialog'},
	                {text: '弹出单选框', url: basePath+'/MainContrller/singlePopup'},
	                {text: '弹出多选框', url: basePath+'/MainContrller/multiPopup'},
		        ]
	        },
		    {
	        	text: '网格系统', type: 'dropdown', 
		    	subitems: [
	                {text: '简单网格', url: basePath+'/MainContrller/simpleGrid'},	                
		        ]
	        },
		    {
	        	text: '布局', type: 'dropdown', 
		    	subitems: [
	                {text: '简单布局', url: basePath+'/MainContrller/simpleLayout'},	                
		        ]
	        },	        
		],
		onMenuClick: function(menu){
			//alert(1);
		}
    });


	$("#menu .dropdown").mouseover(
	    function(){
	    	$(this).addClass('open');
	    }
	).mouseout(
		function(){
			$(this).removeClass('open');
		}
	);
});
